package com.atguigu.gmall.list.feign;

import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 商品上下架调用的feign接口
 */
@FeignClient(name = "service-list",path = "/api/list",contextId = "GoodsFeign")
public interface GoodsFeign {
    /**
     * es 中新增商品
     * @param skuId
     * @return
     */
    @GetMapping("/addGoods/{skuId}")
    public Result addGoods(@PathVariable("skuId") Long skuId);

    /**
     * es 中删除商品
     * @param goodsId
     * @return
     */
    @GetMapping("/removeGoods/{goodsId}")
    public Result removeGoods(@PathVariable("goodsId") Long goodsId);
}
